#!/bin/sh

#this command must be executed from the nagios head after any host configuration changes have been made.
# It will update the /objects directories of all gathering minions to reflect the new setup and reload those
# configs into the software.

#copy files to 0n10 and reload
scp -r /usr/local/nagios/etc/objects/minions/ nagios0n10minion.pni.princeton.edu:/usr/local/nagios/etc/objects/
ssh nagios0n10minion service nagios reload

#copy files to 87 propsect and reload
scp -r /usr/local/nagios/etc/objects/minions/ nagios87prospectminion.pni.princeton.edu:/usr/local/nagios/etc/objects/
ssh nagios87prospectminion service nagios reload

#copy files to 0n19 propsect and reload
scp -r /usr/local/nagios/etc/objects/minions/ nagios0n19minion.pni.princeton.edu:/usr/local/nagios/etc/objects/
ssh nagios0n19minion service nagios reload